package com.myidis.servlet;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.myidis.entity.AnalysisTheme;
import com.myidis.mapper.SubjectAnalyticMapper;

@Service
public class SubjectAnalyticServlet {
	@Autowired
	private SubjectAnalyticMapper subjectAnalyticMapper;
	
	public List<AnalysisTheme> all(){
		return subjectAnalyticMapper.all();
	}

	public List<AnalysisTheme> detail(){
		return subjectAnalyticMapper.detail();
	}

	public int add(AnalysisTheme add) {
		return subjectAnalyticMapper.insert(add);
	}
	
	public int update(AnalysisTheme upd) {
		return subjectAnalyticMapper.update(upd);
	}
	
	public int delete(AnalysisTheme del) {
		return subjectAnalyticMapper.delete(del.getName());
	}
}